import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import reportWebVitals from './reportWebVitals';

let exampleStyle = {
  background: "skyblue",
  // 要使用驼峰命名法
  borderBottom: "1px solid red"
}
let element = (
  <div>
    <h1 style={exampleStyle}>123</h1>
  </div>
)
let classStr = 'bkRed1'
let element2 = (
  <div>
    <h1 className={"bkRed " + classStr}>2231</h1>
  </div>
)

let logo = {
  backgroundImage: "url(https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png)"
}

let classStr2 = ["bkRed", "colorOrange"].join(' ')
let element3 = (
  <div>
    <h1 className={classStr2} style={logo}>1234</h1>
  </div>
)
ReactDOM.render(element3, document.getElementById('root'))
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
